{% extends "base.html" %}
{% block title %}修改假日{% endblock %}
{% block navbar %}{{ super() }}{% endblock %}
{% block styles %}{{ super() }}
<style>
    .main-div {
        background: #ffffff none repeat scroll 0 0;
        border-radius: 2px;
        margin: 10px auto 30px;
        max-width: 80%;
        padding: 20px 20px 20px 20px;
    }

    body {
        padding-top: 100px;
    }
</style>
{% endblock %}
{% block scripts %}{{ super() }}
<script src="{{ url_for('static', filename='bootstrap-validator/0.5.3/js/bootstrapValidator.min.js') }}"></script>
<script>
    $(function () {
        $('.datepicker').datepicker({
            format: 'yyyy-mm-dd',
            startDate: '-1y',
            todayBtn: true,
            todayHighlight: true
        });
    });
</script>
{% endblock %}

{% block content %}
<div class="container">
    <div class="row">
        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"></div>
        <div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">
            {% include 'flash_message.html' %}
            <form action="{{ url_for('bp_admin.holiday_edit', holidayid=holiday[0] ) }}" method="POST">

                <div class="form-group">
                    <label>日期</label>
                    <input type="text" name="date" class="form-control" value="{{ holiday.date }}" disabled="disabled"
                        required>
                </div>
                <div class="form-group">
                    <label>描述</label>
                    <input type="text" name="desc" class="form-control" value="{{ holiday.desc }}" required>
                </div>
                <div class="checkbox">
                    <label>
                        {% if holiday.isworkday %}
                        <input type="checkbox" name="isworkday" checked>是否补班日(补班请勾上)
                        {% else %}
                        <input type="checkbox" name="isworkday">是否补班日(补班请勾上)
                        {% endif %}
                    </label>
                </div>
                <button type="submit" class="btn btn-primary">Submit</button>

            </form>
        </div>
        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"></div>
    </div>
</div>
{% endblock %}